<?php
require_once 'json.php';
require_once 'dbhelper.php';
//取值-
$username=$_REQUEST['username'];
$password=$_REQUEST['pwd'];
$password=mds($password);
//
$connect = db::getinstance()->connect();
$result=mysql_query("select userid,password,token from account where userid=".$username,$connect);
if(mysql_num_rows($result)==0){
	response::json('-10001','用户不存在')；
}else{
	$arr = mysql_fetch_array($result);
	if($arr['userid']) == $username && $arr['password']==$password{
		responce::json('10001','登陆成功')；
	}else{
			responce::json('-10002','密码出错')；
	}
}
?>